import request from '@/utils/request'

export function login(data) {
  return request({
    // url: '/api/sys/login',
    // 跨域第三方代理
    url: '/sys/login',
    method: 'post',
    data
  })
}
// 获取登录用户资料
export function getuserProfile() {
  return request({
    url: '/sys/profile',
    method: 'post'

  })
}
export function getuserDetail(id) {
  return request({
    url: `/sys/user/${id}`
    // method: 'post'
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}
/**
 * @returns
 */
export function getUserDetailById(id) {
  return request({
    url: `/sys/user/${id}`
  })
}
